<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <div>
        <h3>{{firstName}} {{lastName}}</h3>
        <h3>{{fullName}}</h3>
        <h3></h3>
      </div>
    </div>
    <script src="./vue.js"></script>
    <script>
      new Vue({
        el: "#app",
        data: {
          firstName: "li",
          lastName: "jack",
          gender: 1,
        },
        computed: {
          // 只读
          fullName() {
            return `${this.firstName} ${this.lastName}`;
          },
        },
        mounted() {
          setTimeout(() => {}, 3000);
        },
      });
    </script>
  </body>
</html>
